import React, { memo, useEffect} from 'react'
import { useDispatch } from 'react-redux'

import { DJRadioWrapper } from './style'
import CateList from './c-cpns/cate-list'
import DjradioRank from './c-cpns/djradio-rank'
import GoodNewDjradio from './c-cpns/good-new-djradio'
import {getDjRadioCateListAction} from './store/actionCreators'
export default memo(function DjRadio() {

  const dispatch = useDispatch()
  useEffect(() => {
    dispatch(getDjRadioCateListAction())
  }, [dispatch])
  return (
    <DJRadioWrapper className="wrap-v2">
      <CateList/>
      <GoodNewDjradio/>
      <DjradioRank/>
    </DJRadioWrapper>
  )
})
